#define _CRT_SECURE_NO_WARNINGS 

#include <stdio.h>
int main()
{
    int n;
    scanf("%d", &n);
    double e = 1;
    for (int c = 1; c <= n; c++)
    {
        double d = 1;
        for (int j = 1; j <= c; j++)

        {
            d *= j;
        }
        e += 1.0/ d;
    }
    printf("%.10lf", e);

    return 0;
}